package com.ruicar.afs.cloud.account.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import com.ruicar.afs.cloud.common.modules.contract.enums.VoucherDataSources;
import com.ruicar.afs.cloud.common.modules.contract.enums.VoucherStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author: Lee
 * @date 2020-05-29 07:08:27 
 * @description 凭证信息
 */
@Data
@Accessors(chain = true)
@TableName(value ="voucher_info")
public class VoucherInfo extends BaseEntity<VoucherInfo> {

	@ApiModelProperty("主业务事件")
	@NotBlank(message = "主业务事件不能为空")
	private String mainBusiness;

	@ApiModelProperty("主业务事件代码")
	@NotBlank(message = "主业务事件代码不能为空")
	private String mainBusinessCode;

	@ApiModelProperty("子业务事件")
	@NotBlank(message = "子业务事件不能为空")
	private String childBusiness;

	@ApiModelProperty("子业务事件代码")
	@NotBlank(message = "子业务事件代码不能为空")
	private String childBusinessCode;

	@ApiModelProperty("事件触发时间")
	private String triggerTime;

	@ApiModelProperty("数据来源")
	@NotNull(message = "数据来源不能为空")
	private VoucherDataSources dataSources;

	@ApiModelProperty("适用场景")
	@NotBlank(message = "适用场景不能为空")
	private String atomScope;

	@ApiModelProperty("描述")
	private String description;

	@ApiModelProperty("状态:new-创建 active-生效 invalidity-无效")
	private VoucherStatus status ;

}
